// extensions/customTextStyle.js
import TextStyle from '@tiptap/extension-text-style'

export default TextStyle.extend({
  addAttributes() {
    console.log(11111111)
    return {
      ...this.parent?.(),
      fontFamily: {
        parseHTML: element => element.style.fontFamily.replace(/["']/g, ''),
        renderHTML: attributes => ({
          style: `font-family: ${attributes.fontFamily}`
        })
      },
      fontSize: {
        parseHTML: element => element.style.fontSize,
        renderHTML: attributes => ({
          style: `font-size: ${attributes.fontSize}`
        })
      }
    }
  }
})